package com.sugar.queryinfo.module.business.api.bi.dto.resp;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

/**
 * 身份三要素认证 响应体
 */
@Data
public class ZCI002RespVO {

    /**
     * 当前所属运营商 (1：移动；2：联通；3：电信；4：广电)
     */
    private String operator_real;
    /**
     * 当前所属运营商名称
     */
    private String operator_real_name;
    /**
     * 是否携号转网 (0:否； 1:是)
     */
    private String is_xhzw;
    /**
     * 原运营商 (1：移动；2：联通；3：电信；4：广电)
     */
    private String operator;
    /**
     * 原运营商名称
     */
    private String operatorName;
    /**
     * 核验结果 (	0:一致； 1:不一致；3：异常情况)
     */
    private String verification;

    public void setOperator_real(String operator_real) {
        this.operator_real = operator_real;

        if (StrUtil.isBlank(operator_real))
            this.operator_real_name = "";
        else {
            switch (operator_real){
                case "1":
                    this.operator_real_name = "移动";
                    break;
                case "2":
                    this.operator_real_name = "联通";
                    break;
                case "3":
                    this.operator_real_name = "电信";
                    break;
                case "4":
                    this.operator_real_name = "广电";
                    break;
                default:
                    this.operator_real_name = "";
            }
        }
    }

    public void setOperator(String operator) {
        this.operator = operator;

        if (StrUtil.isBlank(operator))
            this.operatorName = "";
        else {
            switch (operator){
                case "1":
                    this.operatorName = "移动";
                    break;
                case "2":
                    this.operatorName = "联通";
                    break;
                case "3":
                    this.operatorName = "电信";
                    break;
                case "4":
                    this.operatorName = "广电";
                    break;
                default:
                    this.operatorName = "";
            }
        }
    }
}
